#include<iostream>
#include<cstdio>
using namespace std;
const int N = 32010;
int tree[N], lever[N];
int n;
int lowbit(int x)
{
	return x & -x;
}
void add(int x, int v)
{
	for (int i = x; i < N; i += lowbit(i)) {
		tree[i] += v;
	}
}
int sum(int x)
{
	int ans = 0;
	for (int i = x; i; i -= lowbit(i)) {
		ans += tree[i];
	}
	return ans;
}
int main()
{
	cin >> n;
	for (int i = 1; i <= n; i++) {
		int x, y;
		scanf("%d%d", &x, &y);
		x++;
		lever[sum(x)]++;
		add(x, 1);
	}
	for (int i = 0; i < n; i++) {
		cout << lever[i] << endl;
	}
	return 0;
}